#include "CEvent.h"



//////////////////////////////////////////////////////////

void	CEvent::SetSwitches(bool enabled)
{
	b_SwitchesEnabled = enabled;
}


bool	CEvent::SwitchesEnabled()
{
	return b_SwitchesEnabled;
}

void	CEvent::SetSwitchesList(std::list<EventSwitch_t> *l_switches)
{
	this->l_Switches = l_switches;
}


EventSwitch_t* CEvent::GetSwich(char id)
{
	for(std::list<EventSwitch_t>::iterator it = l_Switches->begin();
			it != l_Switches->end(); it++)
	{
		if( ((EventSwitch_t)(*it)).c_switch == id ) return (EventSwitch_t*)&(*it);
	}
	return NULL;
}